<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .title {
            background-color: aqua;
        }
    </style>
</head>

<body>
    <div id="test"></div>
    <script src="https://unpkg.com/react@17/umd/react.production.min.js" rel="external nofollow" rel="external nofollow"></script>

    <script src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js" rel="external nofollow" rel="external nofollow"></script>

    <script src="https://unpkg.com/babel-standalone@6/babel.min.js" rel="external nofollow" rel="external nofollow"></script>
    <script type="text/babel">
        const myid='Atguigu'; const mtdata='hello,react'; const VDOM=(
        <div>
            <h2 className="title" id={myid.toLowerCase()}>
                <span style={{color: 'orange', 'font-size': '40px'}}>{mtdata.toLowerCase()}</span></h2>
            <input type="text" />
        </div>

        ); ReactDOM.render(VDOM,document.getElementById('test')); // jsx语法规则 // 1. 定义虚拟DOM时，不要写引号 // 2. 标签中混入Js表达式时要用{} // 3. 样式的类名指定不要用class,要用className // 4. 内联样式，要用style={{key:'value'}} // 5. 虚拟DOM只有一个根标签
    </script>
</body>

</html>